package com.shiguiwu.springmybatis.spring.conditional;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @description: Conditional注解的使用
 * @author: stone
 * @date: Created by 2021/3/15 12:07
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.spring.conditional
 */
public class ConditionalTests {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConditionalConfig.class);

        //System.out.println(MyCondition.class.isAssignableFrom(MyCondition.class));
        //System.out.println(Object.class.isAssignableFrom(MyCondition.class));

        System.out.println("=====================================================");
        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println(applicationContext.getBean(beanDefinitionName));

        }
    }
}
